<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:useBean id="selhome1" scope="session" class="software.Use_user"/>
<%@ page import="java.util.ArrayList" %>
<jsp:useBean id="selhome2" scope="session" class="software.Fri_done"/>
<jsp:useBean id="friend_add1" scope="session" class="software.Fri_done"/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'friend_ask.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  <a href="selhome_main.jsp">返回我的主页</a>
  <br>
    <%
    String Id=session.getAttribute("ID").toString();
    int Id1=Integer.parseInt(Id);
List<String> list2=selhome2.Fri_add_user(Id1);
 %>
<%= list2.size()%>位用户请求加我为好友：
<table align="left" border="1" width="190" height="70">
<%
int k = list2.size();
for(int i=0;i<k;i++){
%>
	<tr bgcolor='#FFCC99' align="center">
          <td height="50%" width="50%">
          <%String name=(String)list2.get(i);
          int id=selhome2.Fri_getid(name);
          %>
     	 <a href="othhome_main.jsp?IDoth=<%=id%>&mk=0"> <%=(String)list2.get(i)%></a>
     	 </td>
     	 <td width="20%">
     	 <a href="friend_chuli_result.jsp?flag=1&ID_User=<%=id%>&ID_Friend=<%=Id1%>">同意</a>
     	 </td>
     	 <td width="30%">
     	 <a href="friend_chuli_result.jsp?flag=0&ID_User=<%=id%>&ID_Friend=<%=Id1%>">不同意</a>
     	 </td>
             </tr>
             <%
}
 %>
  </body>
</html>
